﻿// -------------------------------------------------------------------------
//    @FileName         :    NFCityPlayerMoveExt.h
//    @Author           :    Gao.Yi
//    @Date             :    2025-09-15
//    @Email			:    445267987@qq.com
//    @Module           :    NFCityPlayerMoveExt
//    @Desc             :
//
// -------------------------------------------------------------------------

#pragma once

#include "proto_cs.nanopb.h"
#include "NFComm/NFObjCommon/NFObject.h"
#include "NFComm/NFObjCommon/NFSeqOP.h"

class NFCityPlayer;
class NFCityPlayerMoveExt : public NFSeqOP
{
public:
    NFCityPlayerMoveExt();
    ~NFCityPlayerMoveExt() override;
    int CreateInit();
    int ResumeInit();

public:
    int Tick(NFCityPlayer* pPlayer);
public:
    int InitMapData(const proto_ff::RoleMapData* pRoleMapData);
    int UpdateMapData(int iMapId, Proto_Vector3 oPos, int iDirection);

    bool IsAction() { return m_bIsAction && m_stLastAction.IsStop == false; }

    void ClearLastAction();

    int SetLastAction(const proto_ff::Proto_PvpSynAction* pSynAction);
    int SetDanceAction(const proto_ff::Proto_PvpSynAction* pSynAction);
    const Proto_PvpSynAction* GetLastAction() const { return &m_stLastAction; }
    const RoleMapData* GetMapData() const { return &m_stMapData; }

    bool IsDance() { return m_bIsDance; }
    void SetDance(bool bSet) { m_bIsDance = bSet; }

private:
    Proto_PvpSynAction m_stLastAction;
    bool m_bIsAction;
    int m_iLastSynTime;
    bool m_bIsDance;

    RoleMapData m_stMapData;
};
